package com.xxxx.comment.entity.dto;

import com.xxxx.comment.entity.User;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class UserDTO {

    private Long id;

    private String nickName;

    private String icon;

    private String token;

    public UserDTO(User user) {
        if (user != null) {
            this.id = user.getId();
            this.nickName = user.getNickName();
            this.icon = user.getIcon();
        }
    }

}
